﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/MasterAdmin.master" AutoEventWireup="true" CodeFile="ListOrders.aspx.cs" Inherits="Admin_ListOrders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <h1>List Orders</h1>
    
    <asp:ListView ID="ListView1" runat="server" 
        onitemdatabound="ListView1_ItemDataBound" >
        <AlternatingItemTemplate>
            <tr style="background-color: #FFFFFF; color: #284775;">
                <td>
                    <asp:Label ID="oOrderCodeLabel" runat="server" 
                        Text='<%# Eval("oOrderCode") %>' />
                </td>
                <td>
                    <asp:Label ID="oUserLabel" runat="server" Text='<%# Eval("oUser") %>' />
                </td>
                <td>
                    <asp:Label ID="oDateLabel" runat="server" Text='<%# Eval("oDate") %>' />
                </td>
                <td>
                    <asp:Label ID="oTypePaymentLabel" runat="server" 
                        Text='<%# Eval("oTypePayment") %>' />
                </td>
                <td>
                    <asp:Label ID="oStatusLabel" runat="server" Text='<%# Eval("oStatus") %>' />
                    <asp:LinkButton ID="hlStatusLabel" runat="server" Text='<%# Eval("oStatus") %>' Visible="false" PostBackUrl='<%# Eval("oOrderCode", "UpdateOrder.aspx?oId={0}") %>'></asp:LinkButton>
                </td>
            </tr>
        </AlternatingItemTemplate>
        
        <EmptyDataTemplate>
            <table id="Table1" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                border-color: #999999; border-style: none; border-width: 1px;">
                <tr>
                    <td>
                        No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        
        <ItemTemplate>
            <tr style="background-color: #E0FFFF; color: #333333;">
                <td>
                    <asp:Label ID="oOrderCodeLabel" runat="server" 
                        Text='<%# Eval("oOrderCode") %>' />
                </td>
                <td>
                    <asp:Label ID="oUserLabel" runat="server" Text='<%# Eval("oUser") %>' />
                </td>
                <td>
                    <asp:Label ID="oDateLabel" runat="server" Text='<%# Eval("oDate") %>' />
                </td>
                <td>
                    <asp:Label ID="oTypePaymentLabel" runat="server" 
                        Text='<%# Eval("oTypePayment") %>' />
                </td>
                <td>
                    <asp:Label ID="oStatusLabel" runat="server" Text='<%# Eval("oStatus") %>' />
                    <asp:LinkButton ID="hlStatusLabel" runat="server" Text='<%# Eval("oStatus") %>' Visible="false"  PostBackUrl='<%# Eval("oOrderCode", "UpdateOrder.aspx?oId={0}") %>'></asp:LinkButton>
                    
                </td>
            </tr>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                       <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;
                            border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;
                            font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr id="Tr1" runat="server" style="background-color: #E0FFFF; color: #333333;">
                            
                                <th runat="server">
                                     Order Code</th>
                                <th runat="server">
                                    User</th>
                                <th runat="server">
                                    Date Created</th>
                                <th runat="server">
                                     Type Payment</th>
                                <th runat="server">
                                    Order Status</th>
                            </tr>
                            <tr ID="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                   <td id="Td1" runat="server" style="text-align: center; background-color: #5D7B9D; font-family: Verdana, Arial, Helvetica, sans-serif;
                        color: #FFFFFF">
                        <asp:DataPager ID="DataPager1" runat="server">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                    ShowLastPageButton="True" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:ListView>
    

</asp:Content>

